﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices; // 用 DllImport 需用此 命名空间

namespace PPSignSDKDemoForm
{
    public static class ImportDll
    {
        public enum DEVICE_TYPE_ID
        {
            NONE_DEVICE = 0,
            PPNature_DEVICE = 1,
            PPL398_DEVICE = 2,
            PPLC700_DEVICE = 3,
            PPE640_DEVICE = 4,
            PPL500_DEVICE = 5,
            PPL501F_DEVICE = 7,
            PPW300_DEVICE = 8,
            PPL1000_DEVICE = 9
        };

        public enum ERROR_ID
        {
            RET_PST_SUCCESS	                    = 0,
            RET_PST_FAIL						= -1,
            RET_PST_MAINWINNOEXIST				= -2,
            RET_PST_SIGNWINNOEXIST				= -3,
            RET_PST_SIGN_OUTOFMEMORY			= -4,
            RET_PST_SIGN_GDIAPIERROR			= -5,
            RET_PST_SAVEFAIL					= -6,
            RET_PST_PARAM						= -7,
            RET_PST_INKEMPTY					= -8,
            RET_PST_BmpFileGet					= -9,
            RET_PST_DIBConv						= -10,
            RET_PST_DECODECTRLERROR				= -11,
            RET_PST_CALLBACKNULL				= -12,
            RET_PST_DEVICEERROR					= -13,
            RET_PST_DEVICENOREADY				= -14,
            RET_PST_DEVICEISWORKING				= -15,
            RET_PST_APINOTSUPPORT_IN_THIS_OS	= -16,
            RET_PST_LOAD_PPAVMODDLL_FAIL		= -17,
            RET_PST_NOT_ENABLE_SAVE_VIDEO_DATA	= -18
        };

        public const Int32 HW_GET_STATUS = 1;// 获取设备当前状态
        public const Int32 HW_GET_AXIS_X = 2;// 获取手写签名设备的X的范围值
        public const Int32 HW_GET_AXIS_Y = 3;// 获取手写签名设备的Y的范围值    
        public const Int32 HW_GET_PRESSURE = 4;// 获取手写签名设备的压感级别     
        public const Int32 HW_GET_VENDOR = 5;// 获取手写签名设备的厂商名字       
        public const Int32 HW_GET_PRODUCT = 6;// 获取手写签名设备的设备名字      
        public const Int32 HW_GET_DRV_VER = 7;// 获取手写签名设备的接口版本      
        public const Int32 HW_CLOSE = 8;   // 通知DLL关闭设备

        public const Int32 PPL398_SIGN_API_VERSION_LENGTH = 8;// 版本号长度      
        public const Int32 PPL398_SIGN_API_PAD_ID_LENGTH = 10;// PADID长度            

        public const Int32 PPL398_SIGN_API_ID_BUFFER_LENGTH = 32;////接收penid和padid，secureID的缓冲区长度。对应于GetSecureID, GetPenID             
//        public const Int32 ff = 7;//       

        public struct tagPACKETS
        {
            public Int32 btn;
            public Int32 X;
            public Int32 Y;
            public Int32 Press;
            public bool bStrokeEnd;
        }

        #region Nature
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPNature_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_UnInitialDevice(DEVICE_TYPE_ID deviceID);
        // 设置签名窗尺寸 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SetCanvasSize", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SetCanvasSize(DEVICE_TYPE_ID deviceID, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        //   
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_getDeviceInfo", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        public struct tagPPAXIS
        {
            public Int32 axMin;
            public Int32 axMax;
        }
        //获取手写签名设备的X,Y的范围值
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        //获取手写签名设备 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        ////保存笔迹图像 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_getPackets", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_Clear", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_PacketsBase64Encode", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        // [return: MarshalAs(UnmanagedType.LPStr)]
        public static extern IntPtr PPNature_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat);
        //// 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPNature_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_GetDecodePacketsData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SetPenColor", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SetPenStyle", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SetPenWidth", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_AboutBox", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPNature_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPNature_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPNature_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPNature_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPNature_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);
        #endregion

        #region L398
        /// <summary>
        /// l398
        /// </summary>
        /// <param name="deviceID"></param>
        /// <param name="hWnd"></param>
        /// <returns></returns>
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPL398_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        // 设置签名窗尺寸 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SetCanvasSize", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SetCanvasSize(DEVICE_TYPE_ID deviceID, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        //获取手写签名设备 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        //获取手写签名设备的X,Y的范围值
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        //获取手写签名设备 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        // 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        // // 获取笔的唯一ID值
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetHWPenID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetHWPenID(DEVICE_TYPE_ID deviceID, StringBuilder buffer, UInt32 bufferLen, ref UInt32 idLen);

        //  获取L398板的version ID
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetHWVersionID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetHWVersionID(DEVICE_TYPE_ID deviceID, StringBuilder version);
        //// L398显示Version ID
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_DisplayHWVersion", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_DisplayHWVersion(DEVICE_TYPE_ID deviceID, Int32 bVal);

        ////开LED屏 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_OpenLed", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_OpenLed(DEVICE_TYPE_ID deviceID);
        //// 关闭LED屏
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_CloseLed", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_CloseLed(DEVICE_TYPE_ID deviceID);

        //// 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        //// // 获取签名数据
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        ////L398中读取签名图像 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SaveDeviceImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SaveDeviceImage(DEVICE_TYPE_ID deviceID, StringBuilder ImageName);

        ////L398保存笔迹图像， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        //
        [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)]
        public delegate void CallBackMyFun1(Int32 lParam);

        ////L398  ， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_Clear", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_Clear(DEVICE_TYPE_ID deviceID);

        ////L398 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        // [return: MarshalAs(UnmanagedType.LPStr)]
        public static extern IntPtr PPL398_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);
        ////L398， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL398_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetDecodePacketsData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SetPenColor", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SetPenStyle", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_ReadDeviceData", CharSet = CharSet.Unicode,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_ReadDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPathOut, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SaveDeviceData", CharSet = CharSet.Unicode,
              CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SaveDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPath, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_ClearDeviceData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_ClearDeviceData(DEVICE_TYPE_ID deviceID, Int32 index);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_BeginCalibrate", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_BeginCalibrate(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_EndCalibrate", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_EndCalibrate(DEVICE_TYPE_ID deviceID, bool bCalibrate);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_AboutBox", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL398_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SetPenWidth", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL398_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL398_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)]
        public delegate void NOTIFYREALTIMESIGNDATA(IntPtr wParam, IntPtr lParam);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPL398_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL398_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL398_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);
        #endregion

        #region L500
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPL500_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        // 设置签名窗尺寸 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SetCanvasSize", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SetCanvasSize(DEVICE_TYPE_ID deviceID, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        //获取手写签名设备 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        //获取手写签名设备的X,Y的范围值
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        //获取手写签名设备 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        // 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        // // 获取笔的唯一ID值
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetHWPenID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetHWPenID(DEVICE_TYPE_ID deviceID, StringBuilder buffer, UInt32 bufferLen, ref UInt32 idLen);

        //  获取L500板的version ID
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetHWVersionID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetHWVersionID(DEVICE_TYPE_ID deviceID, StringBuilder version);
        //// L500显示Version ID
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_DisplayHWVersion", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_DisplayHWVersion(DEVICE_TYPE_ID deviceID, Int32 bVal);

        ////开LED屏 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_OpenLed", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_OpenLed(DEVICE_TYPE_ID deviceID);
        //// 关闭LED屏
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_CloseLed", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_CloseLed(DEVICE_TYPE_ID deviceID);

        //// 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        //// // 获取签名数据
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        ////L500中读取签名图像 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SaveDeviceImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SaveDeviceImage(DEVICE_TYPE_ID deviceID, StringBuilder ImageName);

        ////L500保存笔迹图像， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        ////L500  ， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_Clear", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);

        ////L500 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        // [return: MarshalAs(UnmanagedType.LPStr)]
        public static extern IntPtr PPL500_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);
        ////L500， 
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL500_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetDecodePacketsData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SetPenColor", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SetPenStyle", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_ReadDeviceData", CharSet = CharSet.Unicode,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_ReadDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPathOut, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SaveDeviceData", CharSet = CharSet.Unicode,
              CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SaveDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPath, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_ClearDeviceData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_ClearDeviceData(DEVICE_TYPE_ID deviceID, Int32 index);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_BeginCalibrate", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_BeginCalibrate(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_EndCalibrate", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_EndCalibrate(DEVICE_TYPE_ID deviceID, bool bCalibrate);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_AboutBox", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL500_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_SetPenWidth", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL500_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL500_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPL500_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL500_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL500_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);
        #endregion

        #region L501F
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_AboutBox", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL501F_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_InitialDevice", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPL501F_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_UnInitialDevice", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SetPenColor", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SetPenStyle", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_Clear", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_PacketsBase64Encode", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        // [return: MarshalAs(UnmanagedType.LPStr)]
        public static extern IntPtr PPL501F_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL501F_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetDecodePacketsData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetProtectValidStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetProtectValidStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SaveDeviceData", CharSet = CharSet.Unicode,
              CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SaveDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPath, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_ReadDeviceData", CharSet = CharSet.Unicode,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_ReadDeviceData(DEVICE_TYPE_ID deviceID, StringBuilder CertPathOut, Int32 nIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SaveDeviceImage", CharSet = CharSet.Unicode,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SaveDeviceImage(DEVICE_TYPE_ID deviceID, StringBuilder ImageName);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetHWPenID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetHWPenID(DEVICE_TYPE_ID deviceID, StringBuilder buffer, UInt32 bufferLen, ref UInt32 idLen);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetHWVersionID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetHWVersionID(DEVICE_TYPE_ID deviceID, StringBuilder version);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_ClearDeviceData", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_ClearDeviceData(DEVICE_TYPE_ID deviceID, Int32 index);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SetPenWidth", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL501F_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL501F_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPL501F_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_SetDisplayedFPImageAt", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_SetDisplayedFPImageAt(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 lFPLeft, Int32 lFPTop, Int32 lFPWidth, Int32 lFPHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_GetFPImageBase64Data", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL501F_GetFPImageBase64Data(DEVICE_TYPE_ID deviceID, Int32 nImageType, bool bFPImageOnly);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_FreeFPImageBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL501F_FreeFPImageBase64Data(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL501F_EnableCaptureFPImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL501F_EnableCaptureFPImage(DEVICE_TYPE_ID deviceID, bool bEnable);
        #endregion

        #region W300

        public enum W300_HOTKEY
        {
            W300_CLEAN_KEY_CLICK = 0,
            W300_LEFT_KEY_CLICK,
            W300_MIDDLE_KEY_CLICK,
            W300_RIGHT_KEY_CLICK,
            W300_EXTRA_KEY_CLICK
        };

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPW300_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_AboutBox", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPW300_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SetPenColor", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SetPenStyle", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_Clear", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPW300_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPW300_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetDecodePacketsData", CharSet = CharSet.Ansi,
                  CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetProtectValidStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_GetProtectValidStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPW300_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPW300_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SetPenWidth", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetDeviceConfirmOrCancelKeyStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_GetDeviceConfirmOrCancelKeyStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);


        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_GetDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPW300_GetDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_FreeDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPW300_FreeDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPW300_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPW300_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPW300_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);
        #endregion

        #region L1000
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPL1000_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_AboutBox", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL1000_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetPenColor", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetPenStyle", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_Clear", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL1000_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL1000_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetDecodePacketsData", CharSet = CharSet.Ansi,
                  CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetProtectValidStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_GetProtectValidStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL1000_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL1000_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetPenWidth", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_EnableMouse", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_EnableMouse(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetDisplayedFPImageAt", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetDisplayedFPImageAt(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 lFPLeft, Int32 lFPTop, Int32 lFPWidth, Int32 lFPHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_GetFPImageBase64Data", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPL1000_GetFPImageBase64Data(DEVICE_TYPE_ID deviceID, Int32 nImageType, bool bFPImageOnly);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_FreeFPImageBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPL1000_FreeFPImageBase64Data(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_EnableCaptureFPImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_EnableCaptureFPImage(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SetCaptureFPImageThresholdValue", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SetCaptureFPImageThresholdValue(DEVICE_TYPE_ID deviceID, Int32 nMinimumScore);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPL1000_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPL1000_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);
        #endregion

        #region LC700
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPLC700_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_AboutBox", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPLC700_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SetPenColor", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SetPenStyle", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_Clear", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPLC700_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPLC700_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetDecodePacketsData", CharSet = CharSet.Ansi,
                  CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetProtectValidStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetProtectValidStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPLC700_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPLC700_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SetPenWidth", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetDeviceConfirmOrCancelKeyStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_GetDeviceConfirmOrCancelKeyStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);


        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_GetDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPLC700_GetDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_FreeDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPLC700_FreeDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPLC700_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPLC700_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPLC700_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);
        #endregion

        #region E640
        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_InitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern bool PPE640_InitialDevice(DEVICE_TYPE_ID deviceID, IntPtr hWnd, Int32 x, Int32 y, Int32 ulCanvasWidth, Int32 ulCanvasHeight);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_UnInitialDevice", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_UnInitialDevice(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_AboutBox", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPE640_AboutBox();

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SetPenColor", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SetPenColor(DEVICE_TYPE_ID deviceID, UInt32 ulR, UInt32 ulG, UInt32 ulB);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SetPenStyle", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SetPenStyle(DEVICE_TYPE_ID deviceID, UInt32 ulPenID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_Clear", CharSet = CharSet.Ansi,
           CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_Clear(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_PacketsBase64Encode", CharSet = CharSet.Ansi,
             CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPE640_PacketsBase64Encode(DEVICE_TYPE_ID deviceID, Int32 ulFormat);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_PacketsBase64EncodeFree", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPE640_PacketsBase64EncodeFree(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_Base64Decode", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_Base64Decode(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder EncodeStr, StringBuilder SaveFileStr);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetDecodePacketsData", CharSet = CharSet.Ansi,
                  CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetDecodePacketsData(DEVICE_TYPE_ID deviceID, Int32 lIndex, Int32 lGetInkDataType);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetTotalDecodePacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetTotalDecodePacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetTotalPacketsNumber", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetTotalPacketsNumber(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetProtectValidStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetProtectValidStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SetSaveCenterImageClip", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SetSaveCenterImageClip(DEVICE_TYPE_ID deviceID, Int32 bClipBlank, UInt32 ulHorMargin, UInt32 ulVerMargin);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SaveDrawingImage", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SaveDrawingImage(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, StringBuilder ImageName, Int32 dpi);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_getPackets", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_getPackets(DEVICE_TYPE_ID deviceID, ref tagPACKETS InputReport);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPE640_GetInkPointTime(DEVICE_TYPE_ID deviceID, Int32 lIndex);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_FreeInkPointTime", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPE640_FreeInkPointTime(DEVICE_TYPE_ID deviceID, IntPtr pTimeString);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_getDeviceInfo(DEVICE_TYPE_ID deviceID, Int32 nIndex, out IntPtr lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_getDeviceInfoPPAXIS(DEVICE_TYPE_ID deviceID, Int32 nIndex, out tagPPAXIS lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_getDeviceInfo", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_getDeviceInfoString(DEVICE_TYPE_ID deviceID, Int32 nIndex, StringBuilder lpOutput);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetHWPadID", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetHWPadID(DEVICE_TYPE_ID deviceID, StringBuilder padID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SetPenWidth", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SetPenWidth(DEVICE_TYPE_ID deviceID, UInt32 ulWidth);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetDeviceConfirmOrCancelKeyStatus", CharSet = CharSet.Ansi,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_GetDeviceConfirmOrCancelKeyStatus(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SaveDrawingVideo", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SaveDrawingVideo(DEVICE_TYPE_ID deviceID, UInt32 ulFormat, Int32 fps, StringBuilder ImageName);


        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_GetDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern IntPtr PPE640_GetDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_FreeDrawingVideoBase64Data", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void PPE640_FreeDrawingVideoBase64Data(DEVICE_TYPE_ID deviceID, IntPtr pMem);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_EnableSaveVideoData", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_EnableSaveVideoData(DEVICE_TYPE_ID deviceID, bool bEnable);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_SignatureStatusCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern Int32 PPE640_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);

        [DllImport("PPSignToolSDK.dll", EntryPoint = "PPE640_RealTimeSignatureDataCallback", CharSet = CharSet.Unicode,
            CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern long PPE640_RealTimeSignatureDataCallback(DEVICE_TYPE_ID deviceID, NOTIFYREALTIMESIGNDATA pfnRealTimeSignDataCallback);
        #endregion
    }
}
